<!DOCTYPE html>
<html lang="UTF-8" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="https://www.layuicdn.com/layui-v2.5.6/css/layui.css">
    <style>body {
        margin: 15px 15px 15px 15px;
        background: #f2f2f2;
    }
    .layuimini-container {
        border: 1px solid #f2f2f2;
        border-radius: 5px;
        background-color: #ffffff
    }

    .layuimini-main {
        margin: 10px 10px 10px 10px;
    }

    .layuimini-form > .layui-form-item > .required:after {
        content: '*';
        color: red;
        position: absolute;
        margin-left: 4px;
        font-weight: bold;
        line-height: 1.8em;
        top: 6px;
        right: 5px;
    }

    .layuimini-form > .layui-form-item > .layui-form-label {
        width: 120px !important;
    }

    .layuimini-form > .layui-form-item > .layui-input-block {
        margin-left: 150px !important;
    }

    .layuimini-form > .layui-form-item > .layui-input-block > tip {
        display: inline-block;
        margin-top: 10px;
        line-height: 10px;
        font-size: 10px;
        color: #a29c9c;
    }

    .layuimini-container .table-search-fieldset {
        margin: 0;
        border: 1px solid #e6e6e6;
        padding: 10px 20px 5px 20px;
        color: #6b6b6b;
    }
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px
    }
    ::-webkit-scrollbar-track {
        background-color: transparent;
        -webkit-border-radius: 2em;
        -moz-border-radius: 2em;
        border-radius: 2em;
    }

    ::-webkit-scrollbar-thumb {
        background-color: #9c9da0;
        -webkit-border-radius: 2em;
        -moz-border-radius: 2em;
        border-radius: 2em
    }
    table {
        width: 100%;
    }
    th,td {
        height: 65px;
        text-align: center;
    }
    .add{
        width:120px;
        height:50px;
        border:none;
        border-radius: 15px;
        background-color:#1E9FFF;

    }
    .delete{
        width:120px;
        height:50px;
        border:none;
        border-radius: 15px;
        background-color:#FF5722;
    }
    .revise{
        width:120px;
        height:50px;
        border:none;
        border-radius: 15px;
        background-color:#ffb800;
    }
    a{
        color:white;
    }
    a:hover {
        color: black;
    }
    </style>
</head>
<body>
<form action="/list" method="get">
    <div class="layuimini-container">
        <div class="layuimini-main">
            <fieldset class="table-search-fieldset">
                <legend>搜索信息</legend>
                <div style="margin: 10px 10px 10px 10px">
                    <form class="layui-form layui-form-pane" action="">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">姓名</label>
                                <div class="layui-input-inline">
                                    <input name="name" type="text" value="" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">年龄</label>
                                <div class="layui-input-inline">
                                    <input name="age" type="text" value="" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <button  type="submit" class="layui-btn layui-btn-primary"> 搜 索</button>
                            </div>
                        </div>
                    </form>
                </div>
            </fieldset>
        </div>
    </div>
</form>

<table border="1">
    <tr>
        <th>
            <div class="layui-table-cell laytable-cell-1-0-0">
                <span>ID</span>
            </div>
        </th>
        <th>
            <div class="layui-table-cell laytable-cell-1-0-0">
                <span>姓名</span>
            </div>
        </th>
        <th>
            <div class="layui-table-cell laytable-cell-1-0-0">
                <span>年龄</span>
            </div>
        </th>
        <th colspan="2">
            <button class="add"><a href="student/create">添加</a></button>
        </th>
    </tr>
    <tr th:each="student:${students}">
        <td th:text="${student.id}"></td>
        <td th:text="${student.name}"></td>
        <td th:text="${student.age}"></td>
        <td><button class="delete"> <a th:href="@{/list/delete/{id}(id=${student.id})}">删除</a></button></td>
        <td><button class="revise"> <a th:href="@{/list/update/{id}(id=${student.id})}">编辑</a></button></td>
    </tr>
</table>
</body>
</html>
